package cn.cs.client;

import cn.cs.config.CsConfiguration;
import cn.cs.fallback.AccountDetailFallBack;
import cn.cs.fallback.QgTradeFallBack;
import cn.cs.pojo.QgTrade;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * Created by yuexl
 */
@FeignClient(name = "cs-pay-provider", configuration = CsConfiguration.class, fallback = QgTradeFallBack.class)
public interface QgTradeClient {



    @RequestMapping(value = "/insertQgTrade", method = RequestMethod.POST)
    public Integer insertQgTrade(@RequestBody QgTrade qgTrade) throws Exception;



    @RequestMapping(value = "/updateMoneyByType", method = RequestMethod.POST)
    public Integer updateMoneyByType(@RequestParam("money") String money, @RequestParam("type") String type) throws Exception;

    @RequestMapping(value = "/getFundsAccountByType", method = RequestMethod.POST)
    public Map<String, Object> getFundsAccountByType(@RequestParam("type") String type)throws Exception;

    @RequestMapping(value = "/saveFundsCarryOver", method = RequestMethod.POST)
    public Integer saveFundsCarryOver(@RequestBody Map<String, Object> map)throws Exception;

    @RequestMapping(value = "/getFundsCarryOverByType", method = RequestMethod.POST)
    public List<Map<String, Object>> getFundsCarryOverByType(@RequestParam("type") String type)throws Exception;


}

